<?php
class JQGridHelper {
    static function convert($data, $idField) {
        $result = array();
        for ($i = 0; $i < count($data); $i++) {
            $result[$i] = array(
                id => $data[$i][$idField],
                cell => array(),
            );
            foreach ($data[$i] as $key=>$value) {
                if ($key == $idField) { continue; }
                $result[$i]['cell'][] = $value;
            }
        }
        return $result;
    }
}

?>
